package swordToOffer.chapter2;

import model.Apple;

/**
 * @author 邓天天
 * @date 2021/9/9
 * 实现单例
 */
public class Question2 {
    private static Apple apple = null;

    public static Apple getApple() {
        if (apple == null) {
            apple = new Apple();
        }
        return apple;
    }

}
